capture log close
set linesize 250
clear all
set more off

**************** 
***  PATHS   ***  
****************
*BCCR: 1 if at Central Bank
global BCCR=1
global last_year_revec=2017

if $BCCR == 1 {
	global path0 "Y:/Projects/MNC_Suppliers/Suppliers_Alfaro-Urena_Manelici_Vasquez/codes"
}

if $BCCR == 0 {
	global path0 "~/Documents/GitHub/Suppliers_Alfaro-Urena_Manelici_Vasquez/codes"
}

cd $path0
timer on 99

******************************************************************************** 
***      MASTER DO FILE FOR Alfaro-Urena, Manelici, and Vasquez. QJE 2021
********************************************************************************
*folders for results 
capture mkdir log_files
capture mkdir results
capture mkdir results/0-main_text
capture mkdir results/1-appendix_a
capture mkdir results/2-appendix_b
capture mkdir results/3-appendix_c
capture mkdir results/4-appendix_d
capture mkdir results/5-appendix_e
capture mkdir results/6-appendix_f

*data construction 
do ${path0}/all_codes/1-event_data_creation.do

*main variables for analysis
do ${path0}/all_codes/2-data_preparation.do

*results in the main body of the paper
do ${path0}/all_codes/3-main_results.do

*appendix A
do ${path0}/all_codes/4-appendix_a.do

*appendix B
do ${path0}/all_codes/5-appendix_b.do

*appendix C
do ${path0}/all_codes/6-appendix_c.do

*appendix D
do ${path0}/all_codes/7-appendix_d.do

*appendix E
do ${path0}/all_codes/8-appendix_e.do

*appendix F
do ${path0}/all_codes/9-appendix_f.do

******************************************************************************** 
***  TIMER
********************************************************************************
timer off 99
*time in seconds
timer list 99
*time in minutes
local time_ =round(`r(t99)'/60)
local timeh =`time_'/60
display "the code takes `time_' minutes. Or `timeh' hours in total"

